package discount;

import junit.framework.Assert;
import junit.framework.TestCase;

public class DiscountTest extends TestCase {

	private Discount d;
	
	public DiscountTest(String name) {
		super(name);
	}

	protected void setUp() throws Exception {
		super.setUp();
		d = new Discount();
	}

	protected void tearDown() throws Exception {
		super.tearDown();
		d = null;
	}
	
	public void test100(){
		double discountPrice = d.discount(100);
		Assert.assertEquals(92, discountPrice, 1e-14);
	}
	
	public void test200(){
		double discountPrice = d.discount(200);
		Assert.assertEquals(168, discountPrice, 1e-14);
	}

}
